package com.jason.controller;

import com.jason.core.config.ClientRequestMessage;
import com.jason.core.config.ServerResponseMessage;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;

public class WsController {

    @MessageMapping("/welcome")
    @SendTo("/topic/getResponse")
    public ServerResponseMessage say(ClientRequestMessage message) {
        System.out.println(">>>>>>>>>>>>>> " + message.getName());
        return new ServerResponseMessage("Welcome," + message.getName() + "!");
    }

}